package com.sn.author.common.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @Author xiaom
 * @Date 2020/9/15 21:08
 * @Version 1.0.0
 * @Description <>
 **/
@Component
public class AppConfig {

    /**
     * JWT默认过期时间
     */
    public static Long jwtExpireTime;

    /**
     * JWT私钥
     */
    public static String jwtSecret;

    @Value("${jwt.secret}")
    public void setJwtSecret(String jwtSecret) {
        AppConfig.jwtSecret = jwtSecret;
    }

    @Value("${jwt.expireTime}")
    public void setJwtExpireTime(Long jwtExpireTime) {
        AppConfig.jwtExpireTime = jwtExpireTime;
    }

}
